<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<title>会诊详情</title>
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">		
	<link rel="stylesheet" href="css/mui.min.css">
	<link rel="stylesheet" href="css/grandeHealth.css">
	<link rel="stylesheet" type="text/css" href="css/modelManager.css"/>
	<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
	<style>
		.mui-table-view .mui-pull-left{
			width: 30%;
		}
		.mui-table-view .mui-pull-left,.mui-table-view .mui-pull-right{
			height: 30px;
			line-height: 30px;
			
		}
		.mui-table-view .mui-pull-right{
			width: 70%;
			text-align: right;
		}
		.mui-table-view-cell{
			padding: 15px;
		}
		.mui-table-view-cell>a:not(.mui-btn){
			   white-space:normal; 
		}
		.huizdetail{
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 3;
			overflow: hidden;
		}
		.huizdetail{
			margin-right: 10px;
		}
		.mui-col-xs-3:after{height: 0;}
		.mui-table-view .mui-media-object {
		    max-width: 60px;
		    height: 60px;
		}
		#list li{padding: 11px 10px 11px 0px;}
     	#list li p{width: 60px;text-align: center;}
     	.addReduce{padding: 11px 10px;}
		.addReduce img{width:60px;height:60px;border: 1px solid #ccc;}
		.addReduce{
			display: none;
		}
		.mui-content>.mui-table-view:first-child {
		    margin-top: 5px;
		}
	</style>
	</head>
	<body>
		<div id="app">
		<!--<header>class="mui-bar mui-bar-nav" style="display: block;height: 64px;padding-top:20px">
	        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    	<h1 class="mui-title">会诊详情</h1>
		</header>-->
		
		<div class="mui-content">
			<ul  class="mui-table-view" >
				<li class="mui-table-view-cell">
					<div class="mui-pull-left mui-ellipsis">
						会诊名称
					</div>
					<div class="mui-pull-right mui-ellipsis">
						{{data.name}}
					</div>
				</li>
				<li class="mui-table-view-cell">
					<div class="mui-pull-left mui-ellipsis">
						会诊时间
					</div>
					<div class="mui-pull-right mui-ellipsis">
						{{data.dat}}
					</div>
				</li>
				<li class="mui-table-view-cell">
					<div class="mui-pull-left mui-ellipsis">
						患者
					</div>
					<div class="mui-pull-right mui-ellipsis">
						{{data.patient}}
					</div>
				</li>
				<li class="mui-table-view-cell">
					<div class="mui-pull-left mui-ellipsis">
						患者所属机构
					</div>
					<div class="mui-pull-right mui-ellipsis">
						{{data.hospital}}
					</div>
				</li>
				<li class="mui-table-view-cell " id="open">
					<a href="javascript:void(0);" class="mui-navigate-right">
						<div class=" mui-ellipsis">
							会诊说明
						</div>
						
						<div class="huizdetail" v-bind:data-content="[data.note]">
							{{data.note}}
						</div>
					</a>
				</li>
				<li class="mui-table-view-cell ">
						<div class=" mui-ellipsis">
							会诊医生
						</div>
						<ul id="list" class="mui-row mui-table-view mui-table-view-chevron">
							<!--<li style="" class="mui-table-view-cell mui-media mui-col-sm-3 mui-col-xs-3">
								<img class="mui-media-object" src="images/banner_1@2x.png">
								<p class="mui-ellipsis" style="">主标题</p>
							</li>-->
							<!--<li class="addReduce mui-col-sm-3 mui-col-xs-3">
								<img class="mui-media-object" src="images/changeNewpwd.png">
							</li>
							<li class="addReduce mui-col-sm-3 mui-col-xs-3">
								<img class="mui-media-object" src="images/changeNewpwd.png">
							</li>-->
						</ul>
					
				</li>
	       </ul>
		</div>
		</div>
		<script src="js/jquery-1.7.2.min.js"></script>
		<script src="js/mui.min.js"></script>
		<script src="js/grandeHealth.js"></script>
		<script src="js/local.js"></script>
		<script>
				
		var vm = new Vue({
		    el:'#app',
		    data:{data:""},
		    created:function(){
		    	console.log(this)
		    	var _self=this;
		        sendajax(_self);
		    },
		    methods:{
		    	
		    }
		   
		  });
		  
		  var crtusr= '';//会诊创建人id
		  var a='';//诊室guid
		 	function sendajax(_self){
		 		a=newobj.getItem("extras1").id;//诊室guid
				var url=XHDOC_WEBBASE+'v1/mpc/queryMutilDetail?param='+a;
				ajaxUtil('get', url, {userid:XHDOC_APP_USRGUID}, function(data){
				 	var html = '';
				 	if (data.code==000) {
				 		var data=data.data;
				 		_self.data=data[0];
				 		console.log(data);
				 		crtusr =data[0].crtusr;
				 		
				 	} else{
				 		mui.toast("数据加载失败");
				 	}
				 })
			}
		
			mui("body").on("tap", "#open", function() {
				var value=$.trim($(this).find('.huizdetail').html());
				console.log(value);
				newobj.setItem('value',value);
				if (value == '') {
					
				} else{
					showpage('consultationexplain.html', 'consultationexplain.html');
				}
		    	
				
			})
			mui("body").on("tap", ".addReduce", function() {
				showpage('choicePatient.html','choicePatient.html')
			})

			doclist();
			//诊室成员列表v1/mpc/queryMutilBer?refid=e45642b05e5145df8dcdb3d15d19606b
			function doclist(){
				a=newobj.getItem("extras1").id;//诊室guid
				var url=XHDOC_WEBBASE+'v1/mpc/queryMutilBer?refid='+a;
				ajaxUtil('get', url, {}, function(data){
				 	var html = '';
				 	if (data.code==000) {
				 		var data=data.data;
				 		for (i=0;i<data.length;i++) {
				 			html +=
				 			'<li class="mui-table-view-cell mui-media mui-col-sm-3 mui-col-xs-3">'+
								'<img class="mui-media-object" src="'+DOCIMG+data[i].img+'">'+
								'<p class="mui-ellipsis" style="">'+data[i].name+'</p>'+
							'</li>'
							
				 		}
				 		$('#list').html(html);
				 		
				 	} else{
				 		mui.toast("数据加载失败");
				 	}
				 })
			}
			
			window.localStorage.removeItem('extras1');
	    </script>
	    
	</body>
</html>


